package com.opennetexam.manager.readjson;

import com.opennetexam.manager.examplan_new.ExamPlan;
import com.opennetexam.manager.utils.FileUtil;
import com.opennetexam.manager.utils.GsonUtil;

/**
 * @author 奶茶
 * Created by on 2018/7/30.
 */
public class LoadJson {

    /**
     * read json format exam plan
     * @param jsonFilePath
     * @return
     */
    public static ExamPlan loadExamPlanJson(String jsonFilePath){
        String examPlanJson = FileUtil.getFileContent(jsonFilePath);
        return GsonUtil.fromJsonToObject(examPlanJson,ExamPlan.class);
    }
}
